


{include file="/public/top" /}
<script type="text/javascript">
<!--头部和左部公共JS-->
$(document).ready(function(){
	$('.right_side').height($(window).height()-60);
	$(".sidebar_menu > li.active a").click(function(){
		var thisli = $(this);
	    if(thisli.parent().find('.treeview_menu').is(':hidden')){
			thisli.parent().addClass('current');
			thisli.parent().find('ul.treeview_menu').slideDown(300);	
			thisli.parent().find("a i.fa").addClass('pull_right');
		}else{
			thisli.parent().removeClass('current');
			thisli.parent().find('ul.treeview_menu').slideUp(100);	
			thisli.parent().find("a i.fa").removeClass('pull_right');
		}
	});
	$('.treeview_menu li').click(function(){
		$('.treeview_menu li').removeClass('on');
		$(this).addClass('on');
	});
	
});
</script>


<div class="pad">
          <div class="breadNav">
          	<div class="flt breadNav_text">
            <span>会员</span><i></i><span>会员管理</span><i></i><span>编辑会员</span>
           
            </div>
          </div>
		<form  action="" method="post"  enctype="multipart/form-data">
           <div class="daemonTable">
              	<table class="table_data" cellpadding="0" cellspacing="0">
                     <tbody><tr>
                        <th class="alginRt w-200"><font class="pointcl">*</font> 用户名 </th>
                        <td>
                        	<input type="text" name="" value="{$userf.name}" class="text w-400" readonly >
							<input type="hidden" name="id" value="{$userf.id}" class="text w-400" readonly >
                        </td>
                    </tr>
                    <tr>
                        <th class="alginRt w-200"><font class="pointcl">*</font> 密码 </th>
                        <td>
                        	<input type="text" name="pwd" value="{$userf.pwd}" class="text w-400">
                        </td>
                    </tr>
                        <tr>
                        <th class="alginRt w-200"><font class="pointcl">*</font> 交易密码 </th>
                        <td>
                        	<input type="text" name="paypwd" value="{$userf.paypwd}" class="text w-400">
                        </td>
                    </tr>
                    
                   
                    
                   
                    <!--                     
                                                             <tr>
                                                                <th class="alginRt w-200"> 头像 </th>
                                                                <td><div class="fileBox w-200">
                                                                
                                                                 <img id="photo_img" src="__pic__{$userf.txpic}">
                                                                </div>
                                                                  
                                                                  <input class="file" id="photo_file" name="image" type="file" multiple="true" value="">
                                                                 </td>
                                                              </tr> -->
                    <tr>
                        <th class="alginRt w-200"> 邮箱 </th>
                        <td>
                        	<input type="text" name="email" value="{$userf.email}" class="text w-400">
                        </td>
                    </tr>
					 <tr>
                        <th class="alginRt w-200"> 开户银行 </th>
                        <td>
                        	<input type="text" name="bankname" value="{$userf.bankname}" class="text w-400">
                        </td>
                    </tr>
					 <tr>
                        <th class="alginRt w-200"> 开户账号 </th>
                        <td>
                        	<input type="text" name="bankcode" value="{$userf.bankcode}" class="text w-400">
                        </td>
                    </tr>
					 <tr>
                        <th class="alginRt w-200"> 具体支行 </th>
                        <td>
                        	<input type="text" name="bankaddress" value="{$userf.bankaddress}" class="text w-400">
                        </td>
                    </tr>
					 <tr>
                        <th class="alginRt w-200"> 开户名 </th>
                        <td>
                        	<input type="text" name="bankrealname" value="{$userf.bankrealname}" class="text w-400">
                        </td>
                    </tr>
					<!--  <tr>
					                         <th class="alginRt w-200"> 预留手机号 </th>
					                         <td>
					                         	<input type="text" name="bankylpo" value="{$userf.bankylpo}" class="text w-400">
					                         </td>
					                     </tr> -->
                    
                    <tr>
                        <th class="alginRt w-200"> 状态 </th>
                        <td>
                        	<select name="state" class="text w-200">
                                <option value="1" {if condition="$userf['state'] eq '1'"}selected {/if}>正常</option>
								
								<option value="2" {if condition="$userf['state'] eq '2'"}selected {/if}>锁定</option>
								                
								</select>
                        </td>
                    </tr>
                    
                    
                   
                    
                      <tr>
                        <th class="alginRt w-100"> </th>
                        <td>
                        <input type="submit" value="确认保存" class="pub_btn">
                        </td>
                      </tr>
                </tbody></table>
           </div>
        </form>  
<div class="breadNav">
          	<div class="flt breadNav_text">
            <span>金额操作</span>
           
            </div>
          </div>
		<form  action="" method="post" id="theForm"  enctype="multipart/form-data">
           <div class="daemonTable">
              	<table class="table_data" cellpadding="0" cellspacing="0">
                     <tbody><tr>
                        <th class="alginRt w-200"><font class="pointcl"></font> 余额 </th>
                        <td>
                        	<input type="text" name="" value="{$userf.amount}" class="text w-400" readonly >
							<input type="hidden" name="id" value="{$userf.id}" class="text w-400" readonly >
                        </td>
                    </tr>
                    <tr>
                        <th class="alginRt w-200"><font class="pointcl">*</font> 金额 </th>
                        <td>
                        	<input type="text" name="money" value="" class="text w-400">
                        </td>
                    </tr>
					<tr>
                        <th class="alginRt w-200"><font class="pointcl"></font> 理由 </th>
                        <td>
                        	<input type="text" name="notice" value="" class="text w-400">
                        </td>
                    </tr>
                    
                   
                    
                   
                                        
                     
                    
                   
                    
                      <tr>
                        <th class="alginRt w-100"> </th>
                        <td>
						<input class="pub_btn" type="button" typef="+" name='submit' value="增加"> 
						<input class="pub_btn" type="button" typef="-" name='submit' value="减少"> 
                       
                        </td>
                      </tr>
                </tbody></table>
           </div>
        </form>
  
     

<div class="theme-popover">   
</div>
<div class="theme-popover-mask"></div>

</div>
<script>
$(function(){
 function loginsubmit(type){
                var money=true;
                var notice=true;
				
               
var form=$('#theForm').serialize();

                if($('#theForm input[name=money]').val() == ''){
                    $('#error').html('<span class="error">金额不能为空!</span>');
                    $('#theForm input[name=money]').focus();
                    money = false;
                    return false;
                }

               
				
               

                if( $('#theForm input[name=money]').val() != ''){
                    $.ajax({
                        async:false,
                        url:"{:url('user/usermoneyxg')}",
                        data:{'money':$('#theForm input[name=money]').val(),'id':$('#theForm input[name=id]').val(),'notice':$('#theForm input[name=notice]').val(),'type':type},
                        type:'post',
                        dataType:'json',
                        success:function(res){
							console.log(res);
							alert(res.msg);
                            if(res.status != 1){
                                
                               
                                money=false;
                                paytype=false;
                                return false;
                            }else{
								 
                             window.location.reload();  
                            }
                        },
                        error : function(XMLHttpRequest, textStatus, errorThrown) {
							console.log(textStatus);
                            $('#error').html('<span class="error">网络失败，请刷新页面后重试!</span>');
                        }
                    });
                }else{
                    return false;
                }
            }

           
            $('#theForm input[name=submit]').on('click',function(){
				var type=$(this).attr('typef');console.log(type);
                loginsubmit(type);
            });
			
			
           
			
        });
</script>

</body></html>